Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle releases for commits and pull requests #20

Closed
wants to merge 3 commits into from

Conversation

vkt1414
Copy link
Collaborator

@vkt1414 vkt1414 commented Dec 1, 2023

This gha will address task 2 of ImagingDataCommons/idc-index-data#2

  • tags:
    • creates a GitHub release with the release tag
    • attaches "latest" csv index to the new release
    • triggers PyPI package release using the git tag
  • Commits
    • runs the tests using current test workflow
    • if queries are updated, csv index is updated and a new 'latest' tag release is created
  • PRs
    • if queries are updated, index is created, index.py is manipulated to replace download url from github releases to the index created by the PR
    • runs the tests with the current test workflow

Comment on lines 14 to 18
def get_latest_idc_release_version(self, view_id):
print("Getting latest IDC release version...")
view = self.client.get_table(view_id)
latest_idc_release_version=int(re.search(r"idc_v(\d+)", view.view_query).group(1))
return latest_idc_release_version
Copy link
Collaborator

@jcfr jcfr Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After browsing https://console.cloud.google.com/marketplace/product/bigquery-public-data/nci-idc-data?project=just-experience-186619

I was able to browser through the table bigquery-public-data.idc_current.dicom_all_view:

image

That said, I couldn't see the version information we are exacting there. Do you know where are these organized ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JC, it is a long story. idc_current BQ dataset contains views defined by queries that point to the latest version of the IDC release, which in turn are stored in the datasets named as bigquery-public-data.idc_v<release_number>, so currently the latest one is idc_v17. There is a known bug with the underlying mechanism from Google that we use that does not expose the actual query behind the view. In the past, you could find it in the Details section of the view. Unfortunately, we do not have any estimate from Google on when this would be fixed. Here's the tracker, but unfortunately it is not public - we will try to make it public: https://issuetracker.google.com/issues/324112186.

Fortunately, this is not a stopper, since we can list all of the idc_v* datasets to get the latest version. See relevant discussion in https://github.com/ImagingDataCommons/idc-index/issues/11#issuecomment-1946308527 - @vkt1414 is going to work on this after we are done with the current time-sensitive activity that is a priority (should be done in 1-2 weeks).

cc: @bcli4d for awareness

Copy link
Collaborator

@jcfr jcfr Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation, that makes sense, and we can indeed see the versioned table listed:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcfr I actually found a better way to get the version info. Sorry I'm behind but I'm planning to work on this gha soon.

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vkt1414 yes, this is indeed a more elegant and I agree a better approach!

@vkt1414
Copy link
Collaborator Author

vkt1414 commented Mar 21, 2024

Closing this PR as there is CI/CD already now

@vkt1414 vkt1414 closed this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants